package com.example.demoproject;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import com.example.demoproject.camera.CameraActivity;
import com.example.demoproject.thread.HandlerActivity;

public class MainActivity extends AppCompatActivity implements View.OnClickListener {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.fragment:
                startActivity(new Intent(this,FragmentActivity.class));
                break;
            case R.id.handler:
                startActivity(new Intent(this, HandlerActivity.class));
                break;
            case R.id.camera:
                startActivity(new Intent(this, CameraActivity.class));
                break;
        }
    }
}
